package org.dromara.file.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.file.domain.SysMediaFiles;

/**
 * 文件管理业务对象 sys_media_files
 *
 * @author Gjb
 * @date 2025-06-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysMediaFiles.class, reverseConvertGenerate = false)
public class SysMediaFilesBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = { EditGroup.class })
    private Long fileId;

    /**
     * 服务器ip
     */
    @NotBlank(message = "服务器ip不能为空", groups = { AddGroup.class, EditGroup.class })
    private String serverUrl;

    /**
     * 存储桶
     */
    @NotBlank(message = "存储桶不能为空", groups = { AddGroup.class, EditGroup.class })
    private String bucket;

    /**
     * 存储地址
     */
    @NotBlank(message = "存储地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String filePath;

    /**
     * 1:图片 2:音频 3:视频 4:文件 5:其他
     */
    @NotNull(message = "1:图片 2:音频 3:视频 4:文件 5:其他不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long fileType;

    /**
     * 文件大小
     */
    @NotNull(message = "文件大小不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long fileSize;

    /**
     * 文件名称
     */
    @NotBlank(message = "文件名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileName;

    /**
     * 文件id MD5值
     */
    @NotBlank(message = "文件id MD5值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileMd5;

    /**
     * 标签
     */
    @NotBlank(message = "标签不能为空", groups = { AddGroup.class, EditGroup.class })
    private String target;

    /**
     * 扩展名
     */
    @NotBlank(message = "扩展名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String extension;

    /**
     * 审核状态 0:待审核 1:通过 2：驳回
     */
    @NotNull(message = "审核状态 0:待审核 1:通过 2：驳回不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer auditStatus;

    /**
     * 审核意见
     */
    @NotBlank(message = "审核意见不能为空", groups = { AddGroup.class, EditGroup.class })
    private String auditMind;

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 上传人
     */
    @NotBlank(message = "上传人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String userName;

    /**
     * 所属学校
     */
    @NotNull(message = "所属学校不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long schoolId;

    /**
     * 学校名称
     */
    @NotBlank(message = "学校名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String schoolName;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
